<?php
function filexists($file)
 {
   $ps = explode(PATH_SEPARATOR, ini_get('include_path'));
   foreach($ps as $path)
   {
     if(file_exists($path.'/'.$file)) return true;
   }
   if(file_exists($file)) return true;
   return false;
 }